package com.hjc.mvpdemo;

import android.content.Context;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;

import java.io.Serializable;

import bean.UserBean;

public class MainActivity extends AppCompatActivity {

    //
    public static final String EXTRAUSERBEASN = "EXTRAUSERBEASN";

    private Context mContext;
    private UserBean userBean;
    private TextView tv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mContext = this;
        initView();
    }

    private void initView() {
        tv = findViewById(R.id.tv);
        userBean = (UserBean) getIntent().getSerializableExtra(EXTRAUSERBEASN);
        tv.setText("欢迎高级Vip[ " + userBean.getUserName() + " ]登录");
    }

}
